import request from "@/utils/request";
export const getAsks = (param) => {
    return request({
        params: {
            page: param.page,
            pageSize: param.pageSize,
            answerState: param.answerState,
            askIp: param.askIp,
            askTimeBegin: param.askTimeBegin,
            askTimeEnd: param.askTimeEnd,
            content: param.content,
            replyEmail: param.replyEmail,
            state: param.state,
            userDisplayName: param.userDisplayName,
            username: param.username,
            userUuid: param.userUuid,
            uuid: param.uuid
        },
        url: '/console/ask',
        method: 'get'
    })
}

export const updateAskByUuid = (param) => {
    return request({
        data: {
            uuid: param.uuid,
            answerState: param.answerState,
            content: param.content,
            replyEmail: param.replyEmail,
            state: param.state
        },
        url: '/console/ask',
        method: 'put'
    })
}

export const getAskByUuid = (uuid) => {
    return request({
        url: `/console/ask/${uuid}`,
        method: 'get'
    })
}